A computer network is a system of hardware and software that allows two or more computers to communicate with each other. Networks are of several different kinds. For example, local area networks (“LANs”) connect computers within a work-group or department. There are campus networks which extend to multiple buildings on a campus, as well as metropolitan area networks, (“MANs”) which span a city or metropolitan area. There are also wide area networks (“WANs”) that connect nodes in different cities, states and countries.
In a communications network, a network controller typically manages transmission and reception of data packets by transferring data between the network and a shared memory subsystem. The shared memory is used by several different devices including the system processor, input/output (I/O) devices, and disks, as well as the network controller. The network controller may access the shared memory using a shared system bus.
Packet descriptors, or an analogous data structure, are typically used by the network controller to describe the specific information about each data packet, e.g. type, length, and size. The packet descriptors are typically located in the shared memory subsystem, along with the data packets. To transmit or receive a data packet, the network controller typically accesses the packet descriptor for the packet to be communicated, transfers the packet data to or from the shared memory, and then updates the packet descriptor with the new status.
Due to the nature of computer networks, packets are usually delivered to the network operating system in the order they are received. For high-speed networks, several packets may be received before a software driver is called to process the packets. In these circumstances, the received packets may reside in an array maintained in the shared memory until the operating system copies the packets to the host memory. However, if the network controller is running low on resources while processing the array of packets, it may free up resources by copying packets into an operating system buffer. While copying packets into buffers generally operates to release resources, it also introduces the additional task of copying the data into the packet handling process, increasing the load on the memory subsystem. Because packets are typically delivered in the order received, additional packets are usually copied into operating system buffers even after more resources have been made available.